package com.go.where.family.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.go.where.family.dao.SmsAuthCodeDao;
import com.go.where.family.pojo.SmsAuthCodeInfo;

@Repository("smsDao")
public class SmsAuthCodeDaoImpl extends BaseDaoImpl<SmsAuthCodeInfo, String>
		implements SmsAuthCodeDao {

	@Override
	public String getNameSpace() {
		return "mybatis.xml.SmsAuthCodeMapper";
	}

	@Override
	public SmsAuthCodeInfo queryByMobileAndCode(SmsAuthCodeInfo info) {
		// TODO Auto-generated method stub
		return this.getSqlSession().selectOne(
				getNameSpace() + ".queryByMobileAndCode", info);
	}

	@Override
	public List<SmsAuthCodeInfo> queryByMobile(SmsAuthCodeInfo info) {
		List<SmsAuthCodeInfo> list = this.getSqlSession().selectList(
				getNameSpace() + ".queryByMobile", info);
		return list;
	}

}
